package cn.xshi.scms.service.impl;

import cn.xshi.scms.model.SCMSMonitorCpu;
import cn.xshi.common.base.BaseService;
import cn.xshi.scms.dao.SCMSMonitorCpuDao;
import cn.xshi.scms.service.SCMSMonitorCpuService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
 * @Desc 服务器CPU运行
 * @Author 邓纯杰
 * @CreateTime 2012-12-12 12:12:12
 */
@Service
@Slf4j
public class SCMSMonitorCpuServiceImpl extends BaseService implements SCMSMonitorCpuService {

    @Resource
    SCMSMonitorCpuDao scmsMonitorCpuDao;

    /**
     * 查询监控CPU列表
     * @param condition
     * @return
     */
    public List<SCMSMonitorCpu> getSCMSMonitorCpuListByCondition(Map<String,Object> condition){
        return scmsMonitorCpuDao.getSCMSMonitorCpuListByCondition(condition);
    }

    /**
     * 查询对象
     * @param id
     * @return
     */
    public SCMSMonitorCpu getSCMSMonitorCpuById(String id){
        return scmsMonitorCpuDao.getSCMSMonitorCpuById(id);
    }

    /**
     * 添加
     * @param scmsMonitorCpu
     * @return
     */
    public int addSCMSMonitorCpu(SCMSMonitorCpu scmsMonitorCpu){
        return scmsMonitorCpuDao.addSCMSMonitorCpu(scmsMonitorCpu);
    }

    /**
     * 删除
     * @param condition
     * @return
     */
    public int delSCMSMonitorCpu(Map<String,Object> condition){
        return scmsMonitorCpuDao.delSCMSMonitorCpu(condition);
    }

    /**
     * 查询监控CPU列表
     * @return
     */
    public List<SCMSMonitorCpu> getSCMSMonitorCpuList(SCMSMonitorCpu scmsMonitorCpu){
        return scmsMonitorCpuDao.getSCMSMonitorCpuList(scmsMonitorCpu);
    }
}
